package com.demo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDate;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

/**
 * 文书模板
 * @author zm
 * @since 2020-11-24
 */
@Data
@TableName("pd_print_template")
@ApiModel(value="PrintTemplate对象", description="文书模板")
public class PrintTemplate implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "模板编号")
    @TableId(value = "template_id", type = IdType.AUTO)
    private Integer templateId;

    @ApiModelProperty(value = "用户ID号上次更新用户ID号")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "模板名称")
    @TableField("template_name")
    @NotBlank(message = "模板名称不能为空")
    private String templateName;

    @ApiModelProperty(value = "模板类型")
    @TableField("template_type")
    private Integer templateType;

    @ApiModelProperty(value = "模板内容")
    @TableField("template_content")
    @NotBlank(message = "模板内容不能为空")
    private String templateContent;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID号")
    @TableField("created_user_id")
    private Integer createdUserId;

    @ApiModelProperty(value = "删除时间")
    @TableField("deleted_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deletedTime;

    @ApiModelProperty(value = "删除人ID号")
    @TableField("deleted_user_id")
    private Integer deletedUserId;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updated_time",fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;

    @ApiModelProperty(value = "更新人ID号")
    @TableField("updated_user_id")
    private Integer updatedUserId;




}
